<template>
  <div>
    <h4>协调性平衡评定</h4>
    <el-card class="box-card">
      <el-table
        :data="pgForm"
        stripe
        border
        :span-method="spanMethod"
        style="width: 100%;margin-top: 20px"
        :header-cell-style="{background:'#edf6fa'}"
        :cell-style="cellStyle"
      >
        <el-table-column prop="xtx_assProject" label=" " width="100px" align="center"></el-table-column>
        <el-table-column prop="xtx_buwei" label=" " width="100px" align="center"></el-table-column>
        <el-table-column label="评定内容" align="center">
          <template slot-scope="scope">
            <el-input v-model="scope.row.xtx_assContent"></el-input>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>

export default {
  name: "harmony_assess",
  title: "协调性评定",
  created() {
    if(this.istrans){
      this.pgForm=this.fromdata
    }
  },
  props:{
    fromdata:{},
    istrans:false,
  },
  data() {
    return {
      pgForm: [
        {
          xtx_assProject:'协调性平衡评定',
          xtx_buwei:'指鼻试验',
          xtx_assContent:''
        },{
          xtx_assProject:'协调性平衡评定',
          xtx_buwei:'跟膝胫试验',
          xtx_assContent:''
        },
      ],
    };
  },
  methods: {
    spanMethod({rowIndex,columnIndex}){
      if(columnIndex === 0){
        if(rowIndex === 0){
          return [2,1]
        }else{
          return [0,0]
        }
      }
    },
    cellStyle({columnIndex}){
      if(columnIndex<=1){
        return 'background-color:#edf6fa'
      }else {
        return ''
      }
    }
  }
}
</script>

<style scoped>

</style>
